package tech.xs.sys.api;

import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestParam;
import tech.xs.common.framework.domain.model.ApiResult;
import tech.xs.sys.api.domain.SysRoleBo;

import java.util.List;
import java.util.Set;

@FeignClient(name = "${framework.service.sys.name}", contextId = "SysUserRoleApi")
public interface SysUserRoleApi {

    @GetMapping("/user/role/getRoleCodesByUserName")
    ApiResult<Set<String>> getRoleCodesByUserName(@RequestParam String userName);

    @GetMapping("/user/role/getRolesByUserName")
    ApiResult<List<SysRoleBo>> getRolesByUserName(@RequestParam String userName);

}
